<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>mongodb系列二之增删查改 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="条件操作符&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;= 这个操作符就不用多解释了，最常用也是最简单的db.collection.find({ “field” : { $gt: value } } ); // 大于: field &amp;gt; valuedb.collection.find({ “field” : { $lt: value } } ); // 小于: field &amp;lt; value">
<meta property="og:type" content="article">
<meta property="og:title" content="mongodb系列二之增删查改">
<meta property="og:url" content="http://yoursite.com/2015/12/18/mongodb/2.mongodb系列之增删查改/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="条件操作符&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;= 这个操作符就不用多解释了，最常用也是最简单的db.collection.find({ “field” : { $gt: value } } ); // 大于: field &amp;gt; valuedb.collection.find({ “field” : { $lt: value } } ); // 小于: field &amp;lt; value">
<meta property="og:updated_time" content="2016-01-29T17:47:36.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="mongodb系列二之增删查改">
<meta name="twitter:description" content="条件操作符&amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;= 这个操作符就不用多解释了，最常用也是最简单的db.collection.find({ “field” : { $gt: value } } ); // 大于: field &amp;gt; valuedb.collection.find({ “field” : { $lt: value } } ); // 小于: field &amp;lt; value">
  
    <link rel="alternative" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  

</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-mongodb/2.mongodb系列之增删查改" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2015/12/18/mongodb/2.mongodb系列之增删查改/" class="article-date">
  <time datetime="2015-12-17T18:00:00.000Z" itemprop="datePublished">2015-12-18</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/mongodb/">mongodb</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      mongodb系列二之增删查改
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="u6761_u4EF6_u64CD_u4F5C_u7B26"><a href="#u6761_u4EF6_u64CD_u4F5C_u7B26" class="headerlink" title="条件操作符"></a>条件操作符</h2><p>&lt;, &lt;=, &gt;, &gt;= 这个操作符就不用多解释了，最常用也是最简单的<br>db.collection.find({ “field” : { $gt: value } } ); // 大于: field &gt; value<br>db.collection.find({ “field” : { $lt: value } } ); // 小于: field &lt; value<br>db.collection.find({ “field” : { $gte: value } } ); // 大于等于: field &gt;= value<br>db.collection.find({ “field” : { $lte: value } } ); // 小于等于: field &lt;= value</p>
<h2 id="24all__u5339_u914D_u6240_u6709"><a href="#24all__u5339_u914D_u6240_u6709" class="headerlink" title="$all 匹配所有"></a>$all 匹配所有</h2><p>这个操作符跟 SQL 语法的 in 类似，但不同的是, in 只需满足( )内的某一个值即可, 而$all 必 须满足[ ]内的所有值，例如:<br>db.users.find({age : {$all : [6, 8]}});<br>可以查询出 {name: ‘David’, age: 26, age: [ 6, 8, 9 ] }<br>但查询不出 {name: ‘David’, age: 26, age: [ 6, 7, 9 ] }</p>
<h2 id="24exists__u5224_u65AD_u5B57_u6BB5_u662F_u5426_u5B58_u5728"><a href="#24exists__u5224_u65AD_u5B57_u6BB5_u662F_u5426_u5B58_u5728" class="headerlink" title="$exists 判断字段是否存在"></a>$exists 判断字段是否存在</h2><p>查询所有存在 age 字段的记录<br>db.users.find({age: {$exists: true}});<br>查询所有不存在 name 字段的记录<br>db.users.find({name: {$exists: false}});</p>
<h2 id="Null_u503C_u5904_u7406"><a href="#Null_u503C_u5904_u7406" class="headerlink" title="Null值处理"></a>Null值处理</h2><p>假设三条数据：<br>{“_id”:1, “name”:”user1”, “age”:null}<br>{“_id”:2, “name”:”user2”, “age”:23}<br>{“_id”:3, “name”:”user3”, “address”:”北京”}<br>执行db.collectionName.find({age:null})返回user1和user3的数据，注意：user3并不存在age属性<br>执行db.collectionName.find({age:{“$in”:[null], “$exists”:true}})则只返回user1的数据</p>
<h2 id="24mod__u53D6_u6A21_u8FD0_u7B97"><a href="#24mod__u53D6_u6A21_u8FD0_u7B97" class="headerlink" title="$mod 取模运算"></a>$mod 取模运算</h2><p>查询 age 取模 10 等于 0 的数据<br>db.student.find( { age: { $mod : [ 10 , 0 ] } } )</p>
<h2 id="24ne__u4E0D_u7B49_u4E8E"><a href="#24ne__u4E0D_u7B49_u4E8E" class="headerlink" title="$ne 不等于"></a>$ne 不等于</h2><p>查询 x 的值不等于 3 的数据<br>db.things.find( { x : { $ne : 3 } } )</p>
<h2 id="24in__u5305_u542B"><a href="#24in__u5305_u542B" class="headerlink" title="$in 包含"></a>$in 包含</h2><p>与 sql 标准语法的用途是一样的，即要查询的是一系列枚举值的范围内<br>查询 x 的值在 2,4,6 范围内的数据<br>db.things.find({x:{$in: [2,4,6]}}); </p>
<h2 id="24nin__u4E0D_u5305_u542B"><a href="#24nin__u4E0D_u5305_u542B" class="headerlink" title="$nin 不包含"></a>$nin 不包含</h2><p>查询 x 的值在 2,4,6 范围外的数据<br>db.things.find({x:{$nin: [2,4,6]}}); </p>
<h2 id="24size__u6570_u7EC4_u5143_u7D20_u4E2A_u6570"><a href="#24size__u6570_u7EC4_u5143_u7D20_u4E2A_u6570" class="headerlink" title="$size 数组元素个数"></a>$size 数组元素个数</h2><p>对于{name: ‘David’, age: 26, favorite_number: [ 6, 7, 9] }记录<br>匹配 db.users.find({favorite_number: {$size: 3}});<br>不匹配 db.users.find({favorite_number: {$size: 2}}); </p>
<h2 id="u6B63_u5219_u8868_u8FBE_u5F0F_u5339_u914D"><a href="#u6B63_u5219_u8868_u8FBE_u5F0F_u5339_u914D" class="headerlink" title="正则表达式匹配"></a>正则表达式匹配</h2><p>查询不匹配 name=B<em>带头的记录<br>db.users.find({name: {$not: /^B.</em>/}}); </p>
<h2 id="Javascript__u67E5_u8BE2_u548C_24where__u67E5_u8BE2"><a href="#Javascript__u67E5_u8BE2_u548C_24where__u67E5_u8BE2" class="headerlink" title="Javascript 查询和$where 查询"></a>Javascript 查询和$where 查询</h2><p>查询 a 大于 3 的数据，下面的查询方法殊途同归<br>db.c1.find( { a : { $gt: 3 } } );<br>db.c1.find( { $where: “this.a &gt; 3” } );<br>db.c1.find(“this.a &gt; 3”);<br>f = function() { return this.a &gt; 3; } db.c1.find(f); </p>
<h2 id="count__u67E5_u8BE2_u8BB0_u5F55_u6761_u6570"><a href="#count__u67E5_u8BE2_u8BB0_u5F55_u6761_u6570" class="headerlink" title="count 查询记录条数"></a>count 查询记录条数</h2><p>count 查询记录条数<br>db.users.find().count();</p>
<p>以下返回的不是 5，而是 user 表中所有的记录数量<br>db.users.find().skip(10).limit(5).count();</p>
<p>如果要返回限制之后的记录数量，要使用 count(true)或者 count(非 0)<br>db.users.find().skip(10).limit(5).count(true);</p>
<h2 id="skip__u9650_u5236_u8FD4_u56DE_u8BB0_u5F55_u7684_u8D77_u70B9"><a href="#skip__u9650_u5236_u8FD4_u56DE_u8BB0_u5F55_u7684_u8D77_u70B9" class="headerlink" title="skip 限制返回记录的起点"></a>skip 限制返回记录的起点</h2><p>从第 3 条记录开始，返回 5 条记录(limit 3, 5)<br>db.users.find().skip(3).limit(5); </p>
<h2 id="sort__u6392_u5E8F"><a href="#sort__u6392_u5E8F" class="headerlink" title="sort 排序"></a>sort 排序</h2><p>以年龄升序 asc<br>db.users.find().sort({age: 1});<br>以年龄降序 desc<br>db.users.find().sort({age: -1}); </p>
<h2 id="eval"><a href="#eval" class="headerlink" title="eval"></a>eval</h2><p>　　查询 test 库的 t1 表中的记录数有多少<br> ./mongo test –eval “printjson(db.t1.count())”</p>
<h2 id="u6267_u884Cjs_u811A_u672C"><a href="#u6267_u884Cjs_u811A_u672C" class="headerlink" title="执行js脚本"></a>执行js脚本</h2><p> ./mongo t1_count.js<br>通过指定 quiet 参数，即可以将一些登录信息屏蔽掉，这样可以让结果更清晰。<br>./mongo –quiet t1_count.js</p>
<h2 id="u5185_u5D4C_u6587_u6863"><a href="#u5185_u5D4C_u6587_u6863" class="headerlink" title="内嵌文档"></a>内嵌文档</h2><p>　　假设已经有了这样的文档记录（其实，采用spring data mongodb也很方便的提取内嵌文档）<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">&gt; db.t.find()</span><br><span class="line">&#123; <span class="string">"_id"</span> : ObjectId(<span class="string">"4f3d1c139423aa8326094ebb"</span>), </span><br><span class="line">  <span class="string">"a"</span> : <span class="number">1</span>, <span class="string">"b"</span> : <span class="number">2</span>, </span><br><span class="line">  <span class="string">"actTime"</span> : ISODate(<span class="string">"2012-02-16T15:09:07.167Z"</span>), </span><br><span class="line">  <span class="string">"task"</span> : [   </span><br><span class="line">    &#123;       <span class="string">"status"</span> : <span class="number">1</span>,   <span class="string">"applyStatus"</span> : <span class="number">2</span>,      <span class="string">"ruleId"</span> : <span class="number">100</span> &#125;,      </span><br><span class="line">    &#123;       <span class="string">"status"</span> : <span class="number">3</span>,   <span class="string">"applyStatus"</span> : <span class="number">0</span>,      <span class="string">"ruleId"</span> : <span class="number">200</span> &#125;</span><br><span class="line">  ] &#125;</span><br></pre></td></tr></table></figure></p>
<p>如果只想取到：1. a=1。2. task中status=1的，不返回status=3的task，可以这么写<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">&gt; db.t.aggregate(&#123;$match:&#123;a:<span class="number">1</span>&#125;&#125;,         <span class="comment">//a=1</span></span><br><span class="line">                 &#123;$project:&#123;c:<span class="number">0</span>&#125;&#125;,       <span class="comment">//排除你不想要的列,都想要的话就排除个不存在的</span></span><br><span class="line">                 &#123;$unwind:<span class="string">"$task"</span>&#125;,      <span class="comment">//展开task数组</span></span><br><span class="line">                 &#123;$match:&#123;<span class="string">'task.status'</span>:<span class="number">1</span>&#125;&#125;,<span class="comment">//task.status=1.这里不能放到前面的match中，因为这是pipeline，放到前面再unwind的话还是2条task</span></span><br><span class="line">                 &#123;$group:&#123;_id:<span class="string">"$_id"</span>,a:&#123;<span class="string">"$first"</span>:<span class="string">"$a"</span>&#125;,task:&#123;$push:<span class="string">"$task"</span>&#125;&#125;&#125;<span class="comment">//把想要的列放进来，task做push操作</span></span><br><span class="line"> )</span><br></pre></td></tr></table></figure></p>
<p>　　这样做的前提是：知道返回哪些列。因为mongodb的特性是scheme-free的，所以很可能我们不关心scheme，最多关心某几列，所以，只有在我们知道要返回哪些列的时候才可以这么用，否则还是等这个需求实现吧。另外，性能如何不知道，没有测过。还有，aggregate也可以先展开在过滤：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&gt; db.t.aggregate(&#123;$unwind:<span class="string">"$task"</span>&#125;,</span><br><span class="line">				&#123;$match:&#123;<span class="string">'task.status'</span>:<span class="number">1</span>,a:<span class="number">1</span>&#125;&#125;,</span><br><span class="line">				&#123;$group:&#123;_id:<span class="string">"$_id"</span>,a:&#123;<span class="string">"$first"</span>:<span class="string">"$a"</span>&#125;,task:&#123;$push:<span class="string">"$task"</span>&#125;&#125;&#125;)</span><br></pre></td></tr></table></figure></p>
<p>　　缺点是：在match之前占用比较多内存。而先做a:1的过滤可以少用点儿。</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2015/12/18/mongodb/2.mongodb系列之增删查改/" data-id="cijzzpvam009j1cfspjhm0moq" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/mongodb/">mongodb</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2015/12/18/mongodb/3.mongodb系列之分片/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          mongodb系列三之分片
        
      </div>
    </a>
  
  
    <a href="/2015/12/18/gradle/1.Gradle系列之安装简介/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Gradle系列一之安装简介</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/cache/">cache</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a><span class="category-list-count">13</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/docker/">docker</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/gis/">gis</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/git/">git</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/go/">go</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/gradle/">gradle</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/groovy/">groovy</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/hadoop/">hadoop</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/java/">java</a><span class="category-list-count">18</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/log/">log</a><span class="category-list-count">11</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mongodb/">mongodb</a><span class="category-list-count">14</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mq/">mq</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mybatis/">mybatis</a><span class="category-list-count">9</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/netty/">netty</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nginx/">nginx</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nio/">nio</a><span class="category-list-count">19</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nodejs/">nodejs</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/redis/">redis</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/rpc/">rpc</a><span class="category-list-count">14</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/spring/">spring</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/tomcat/">tomcat</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/zookeeper/">zookeeper</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/杂项/">杂项</a><span class="category-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/aop/">aop</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/aspectj/">aspectj</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/classloader/">classloader</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/common-loggings/">common-loggings</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/commonjs/">commonjs</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a><span class="tag-list-count">10</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/docker/">docker</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dubbo/">dubbo</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fastdfs/">fastdfs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gclib/">gclib</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/geohash/">geohash</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gis/">gis</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/go/">go</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gradle/">gradle</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovy/">groovy</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hadoop/">hadoop</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hessisan/">hessisan</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a><span class="tag-list-count">48</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javassist/">javassist</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kafka/">kafka</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/log/">log</a><span class="tag-list-count">11</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/log4j/">log4j</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/logback/">logback</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/map/">map</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memecached/">memecached</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mina/">mina</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mongodb/">mongodb</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mq/">mq</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mqtt/">mqtt</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mybatis/">mybatis</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netty/">netty</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nginx/">nginx</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nio/">nio</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nodejs/">nodejs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/postgresql/">postgresql</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/proxy/">proxy</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/push/">push</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rabbitmq/">rabbitmq</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/">redis</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rpc/">rpc</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sitemesh/">sitemesh</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sld/">sld</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/slf4j/">slf4j</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/socket/">socket</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spatialite-for-android/">spatialite for android</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spi/">spi</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spring/">spring</a><span class="tag-list-count">13</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tomcat/">tomcat</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/transaction/">transaction</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/web/">web</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xSocket/">xSocket</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/zbus/">zbus</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/zookeeper/">zookeeper</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/数据结构/">数据结构</a><span class="tag-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/aop/" style="font-size: 15.38px;">aop</a> <a href="/tags/aspectj/" style="font-size: 11.54px;">aspectj</a> <a href="/tags/cache/" style="font-size: 11.54px;">cache</a> <a href="/tags/classloader/" style="font-size: 10px;">classloader</a> <a href="/tags/common-loggings/" style="font-size: 10px;">common-loggings</a> <a href="/tags/commonjs/" style="font-size: 12.31px;">commonjs</a> <a href="/tags/database/" style="font-size: 16.92px;">database</a> <a href="/tags/docker/" style="font-size: 13.85px;">docker</a> <a href="/tags/dubbo/" style="font-size: 10px;">dubbo</a> <a href="/tags/fastdfs/" style="font-size: 10px;">fastdfs</a> <a href="/tags/gclib/" style="font-size: 10.77px;">gclib</a> <a href="/tags/geohash/" style="font-size: 10px;">geohash</a> <a href="/tags/gis/" style="font-size: 10px;">gis</a> <a href="/tags/git/" style="font-size: 10.77px;">git</a> <a href="/tags/go/" style="font-size: 10px;">go</a> <a href="/tags/gradle/" style="font-size: 10px;">gradle</a> <a href="/tags/groovy/" style="font-size: 10px;">groovy</a> <a href="/tags/hadoop/" style="font-size: 10px;">hadoop</a> <a href="/tags/hessisan/" style="font-size: 11.54px;">hessisan</a> <a href="/tags/java/" style="font-size: 20px;">java</a> <a href="/tags/javassist/" style="font-size: 10px;">javassist</a> <a href="/tags/kafka/" style="font-size: 11.54px;">kafka</a> <a href="/tags/linux/" style="font-size: 12.31px;">linux</a> <a href="/tags/log/" style="font-size: 17.69px;">log</a> <a href="/tags/log4j/" style="font-size: 12.31px;">log4j</a> <a href="/tags/logback/" style="font-size: 13.08px;">logback</a> <a href="/tags/map/" style="font-size: 10px;">map</a> <a href="/tags/memecached/" style="font-size: 10.77px;">memecached</a> <a href="/tags/mina/" style="font-size: 13.08px;">mina</a> <a href="/tags/mongodb/" style="font-size: 19.23px;">mongodb</a> <a href="/tags/mq/" style="font-size: 13.85px;">mq</a> <a href="/tags/mqtt/" style="font-size: 10.77px;">mqtt</a> <a href="/tags/mybatis/" style="font-size: 16.15px;">mybatis</a> <a href="/tags/netty/" style="font-size: 10px;">netty</a> <a href="/tags/nginx/" style="font-size: 11.54px;">nginx</a> <a href="/tags/nio/" style="font-size: 13.08px;">nio</a> <a href="/tags/nodejs/" style="font-size: 10px;">nodejs</a> <a href="/tags/postgresql/" style="font-size: 10.77px;">postgresql</a> <a href="/tags/protobuf/" style="font-size: 10px;">protobuf</a> <a href="/tags/proxy/" style="font-size: 10px;">proxy</a> <a href="/tags/push/" style="font-size: 10px;">push</a> <a href="/tags/rabbitmq/" style="font-size: 11.54px;">rabbitmq</a> <a href="/tags/redis/" style="font-size: 13.85px;">redis</a> <a href="/tags/rpc/" style="font-size: 19.23px;">rpc</a> <a href="/tags/sitemesh/" style="font-size: 10px;">sitemesh</a> <a href="/tags/sld/" style="font-size: 10px;">sld</a> <a href="/tags/slf4j/" style="font-size: 10px;">slf4j</a> <a href="/tags/socket/" style="font-size: 14.62px;">socket</a> <a href="/tags/spatialite-for-android/" style="font-size: 10px;">spatialite for android</a> <a href="/tags/spi/" style="font-size: 10px;">spi</a> <a href="/tags/spring/" style="font-size: 18.46px;">spring</a> <a href="/tags/tomcat/" style="font-size: 10.77px;">tomcat</a> <a href="/tags/transaction/" style="font-size: 10px;">transaction</a> <a href="/tags/web/" style="font-size: 10px;">web</a> <a href="/tags/xSocket/" style="font-size: 14.62px;">xSocket</a> <a href="/tags/zbus/" style="font-size: 10px;">zbus</a> <a href="/tags/zookeeper/" style="font-size: 10.77px;">zookeeper</a> <a href="/tags/数据结构/" style="font-size: 10.77px;">数据结构</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a><span class="archive-list-count">67</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">December 2015</a><span class="archive-list-count">81</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/01/30/资料/">(no title)</a>
          </li>
        
          <li>
            <a href="/2016/01/30/java/13.Classloader系列一/">ClassLoader系列一</a>
          </li>
        
          <li>
            <a href="/2016/01/29/hadoop/1.hadoop系列之源码编译/">hadoop系列一之源码编译</a>
          </li>
        
          <li>
            <a href="/2016/01/29/go/1.GO系列之入门/">Go系列一之入门</a>
          </li>
        
          <li>
            <a href="/2016/01/28/tomcat/2.tomcat性能优化/">tomcat性能优化</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 John Doe<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="http://libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

  </div>
</body>
</html>